function sleep(ms){
    let now = Date.now()
    let expire = now + ms
    while(Date.now() < expire){
        
    }
}
console.log('start')
sleep(1000)
console.log('end')